<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
index....<br/>
<!-- 使用el表达式 -->
<span th:text="${userName}"></span><br/>
<h1 th:text="${userName}"></h1><br/>
<input th:value="${userName}">
<div style="width: 100px;height: 100px;background-color: blueviolet" th:text="${userName}">

</div>
<h2 th:value="${userName}" th:id="${userName}">这里是放到属性。。。</h2>
</body>

</html>